package week04.homework01MazeGame.model;

import week04.homework01MazeGame.settings.CellImage;

/**
 * @author li
 */
public class Cell {

    private boolean isObstacle = false;

    private boolean isPlayer = false;

    private boolean isMonster = false;

    private boolean isPotion = false;

    private boolean isEquipment = false;

    private boolean isPlayerPassed = false;

    public Cell() {
    }

    public void setObstacle(boolean permission) {
        isObstacle = permission;
    }

    public void setPlayer(boolean permission) {
        isPlayer = permission;
    }

    public void setMonster(boolean permission) {
        isMonster = permission;
    }

    public void setPotion(boolean permission) {
        isPotion = permission;
    }

    public void setEquipment(boolean permission) {
        isEquipment = permission;
    }

    public void setPlayerPassed(boolean permission) {
        isPlayerPassed = permission;
    }

    public CellImage getCellImage() {
        if (isPlayer()) {
            return CellImage.PLAYER;
        } else if (isObstacle()) {
            return CellImage.OBSTACLE;
        } else if (isMonster()) {
            return CellImage.MONSTER;
        } else {
            return CellImage.PASSAGE;
        }
    }

    public boolean isObstacle() {
        return isObstacle;
    }

    public boolean isPlayer() {
        return isPlayer;
    }

    public boolean isMonster() {
        return isMonster;
    }

    public boolean isPotion() {
        return isPotion;
    }

    public boolean isEquipment() {
        return isEquipment;
    }

    public boolean isPlayerPassed() {
        return isPlayerPassed;
    }

}
